package mybatis.mappers;

import models.entities.CategoryAliasEntity;
import models.entities.CategoryEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CategoryMapper{
    List<CategoryEntity> getById(@Param("parentId") int parentId);

    int create(CategoryEntity category);

    CategoryEntity getDistributorCategory(String distributorId);

    void linkToDistributor(CategoryEntity category);

    CategoryEntity getByTitle(String title);

    CategoryEntity getCategory(@Param("id") int id);

    void addCategoryAlias(CategoryAliasEntity categoryAlias);

    List<CategoryEntity> getCategoryParents(CategoryEntity category);

    List<CategoryAliasEntity> getCategoryAliases(@Param("categoryId") int categoryId);

    void deleteCategoryAlias(@Param("aliasId") int aliasId);

    CategoryEntity get(@Param("id") int categoryId);
}
